package com.xggstudio.crm.ui.mvp.v;

import android.support.v4.view.ViewPager;
import android.view.View;

import com.xggstudio.crm.R;
import com.xggstudio.crm.base.BaseFragment;
import com.xggstudio.crm.ui.mvp.v.adapter.ViewPagerAdapter;

public class ClientMangerFragment extends BaseFragment {

    private ViewPager viewpager;

    @Override
    protected int getLayout() {
        return R.layout.fragment_client;
    }

    @Override
    protected void init(View v) {

        viewpager = (ViewPager) $(R.id.viewpager);

        initViewPager();
    }

    private void initViewPager(){

        ViewPagerAdapter adapter = new ViewPagerAdapter(getChildFragmentManager());
        adapter.addFrag(new CustomerFragment(),"");
        adapter.addFrag(new CallBackFragment(),"");

        viewpager.setAdapter(adapter);

    }


    public void toggle(int pos){
        viewpager.setCurrentItem(pos);
    }

    

}
